<%@ taglib prefix="apache shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib prefix="apache" uri="http://shiro.apache.org/tags" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>

<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <title>欢迎页</title>
</head>
<body>
<a href="/logout">退出</a>
<shiro:hasRole name="normalUser">
    普通用户
    <a href="/sportIndex">运动管理</a>
    <a href="/sportIndexSelect">查询</a>
    <a href="/testPage">心理测试</a>
</shiro:hasRole>

<shiro:hasRole name="admin">
    管理员界面:
    <div onclick="userMangement()">用户管理</div>
    <div onclick="userMangeSelect()">查询所有用户</div>
    <div onclick="news()">发布新闻</div>
</shiro:hasRole>

<script src="../js/jquery-3.2.1.js"></script>
<script>
    function userMangement() {
        window.location.href = "/userManagement";
    }
    function news() {
        window.location.href = "/releaseNewsPage";
    }
    function userMangeSelect() {
        window.location.href = "/userManageSelect";
    }
</script>
</body>
</html>
